// import { request } from "@/utils/request";
import { request } from "../../utils/http";
/**居民api */
export const residentApi = {
  /**@description 存储居民信息 */
  saveResident: (data: PersonalInfoType) => {
    return request.post<{ rid: string }>("/api/saveResident", data);
  },
};

/**
 * 个人信息
 * @property {string} name - 姓名
 * @property {string} IDCard - 身份证号
 * @property {string} tel - 电话
 * @property {string} gender - 性别,男为0,女为1
 * @property {string} birthday - 出生日期
 * @property {string} password - 登录密码
 * @property {string} [userId] - 居民登录id
 * @property {string} [labelArrStr] - 标签id数组JSON
 * @property {string} [picture] - 图片
 * @property {string} [address] - 现居地
 * @property {string} [district] - 行政区划分
 * @property {string} [residenceId] - 户籍类型id
 * @property {string} [nativePlace] - 籍贯
 * @property {string} [residenceAddress] - 户籍地址
 * @property {string} [nationId] - 民族类型id
 * @property {string} [educationId] - 学历类型id
 * @property {string} [maritalStatusId] - 婚姻状态id
 * @property {string} [career] - 职业
 * @property {string} [workUnit] - 工作单位
 * @property {string} [emergencyContact] - 紧急联系人姓名
 * @property {string} [emergencyNumber] - 紧急联系人电话
 * @property {string} [expenseTypeId] - 费用类型id
 * @property {string} [designatedMedicalUnits] - 定点医疗单位
 * @property {string} [origin] - 来源
 */
export interface PersonalInfoType {
  name: string;
  IDCard: string;
  tel: string;
  gender: string;
  birthday: string;
  password: string;
  userId?: string;
  labelArrStr?: string;
  picture?: string;
  address?: string;
  district?: string;
  residenceId?: string;
  nativePlace?: string;
  residenceAddress?: string;
  nationId?: string;
  educationId?: string;
  maritalStatusId?: string;
  career?: string;
  workUnit?: string;
  emergencyContact?: string;
  emergencyNumber?: string;
  expenseTypeId?: string;
  /**定点医疗单位*/
  designatedMedicalUnits?: string;
  origin?: string;
}
